﻿using MDT.LifeSewagePlatform.Conmmon;
using MDT.LifeSewagePlatform.Entity;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Linq;
using System.Threading.Tasks;

namespace MDT.LifeSewagePlatform.InterfaceService
{
    public interface IBaseService
    {

        public Task<bool> BeginTransaction(IDbContextTransaction transaction, Func<IDbContextTransaction, bool> func);


        public bool Auth(string placeType, int AreaID);

        public bool Auth(string placeType);


        public bool Admin(string Role);


        public bool IsChildAccount(int RoleID);

        public Task<IQueryable<T>> QueryPipeLineTime<T>(PipeLineParameter Params, IQueryable<T> drugs) where T : IPipeTime;

        public IQueryable<T> QueryPipeLineRole<T>(PipeLineParameter Params, CurrentUserInfo userInfo, IQueryable<T> drugs,bool IsCity) where T : IPipeRole;
        public IQueryable<T> QueryPipeLineRoleNoCity<T>(PipeLineParameter Params, CurrentUserInfo userInfo, IQueryable<T> drugs) where T : IPipeRole;

        public IQueryable<T> QueryPipeLineTime<T>(PipeLineMoreParameter Params, IQueryable<T> drugs) where T : IPipeTime;


    }
}
